//
//  NetworkTools.swift
//  swft_weibo
//
//  Created by mac on 15/9/11.
//  Copyright © 2015年 mac. All rights reserved.
//

import UIKit
import AFNetworking
class NetworkTools: AFHTTPSessionManager{
    //设置一个静态的网络访问工具类
    static let tools :NetworkTools={
        let url = NSURL(string:  "https://api.weibo.com/")
        
        let smallTool=NetworkTools(baseURL: url)
        
        smallTool.responseSerializer.acceptableContentTypes =  NSSet(objects: "application/json", "text/json", "text/javascript", "text/plain") as! Set<String>
        
        return smallTool
    
    }()
    
   /// 获取单粒的方法
   class func shareNetworkTools() ->NetworkTools {
    
        return tools
    
    }

}
